package com.jvtd.demo.amap;

import android.content.Intent;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.jvtd.base.JvtdActivity;
import com.jvtd.demo.R;

public class GdActivity extends JvtdActivity implements View.OnClickListener
{

  @Override
  protected void bindView()
  {
    TextView tvTitle = findViewById(R.id.tv_title);
    tvTitle.setText("高德定位");
    Toolbar mToolbar = findViewById(R.id.tool_bar);
    setToolbar(mToolbar, true);
    Button btnGdLocation = findViewById(R.id.gd_location);
    btnGdLocation.setOnClickListener(this);
    Button btnGdBackgroundLocation = findViewById(R.id.gd_background_location);
    btnGdBackgroundLocation.setOnClickListener(this);
    Button btnCoordConvert = findViewById(R.id.gd_coord_convert);
    btnCoordConvert.setOnClickListener(this);
    Button btnAlarmLocation = findViewById(R.id.btn_alarm_location);
    btnAlarmLocation.setOnClickListener(this);
  }

  @Override
  protected void getLayout()
  {
    setContentView(R.layout.activity_gd);
  }

  @Override
  protected void initViewAndData()
  {

  }

  @Override
  public void onClick(View view)
  {
    switch (view.getId())
    {
      case R.id.gd_location:
        startActivity(new Intent(this, GdLocationActivity.class));
        break;

      case R.id.gd_background_location:
        startActivity(new Intent(this, GdBackgroundLocationActivity.class));
        break;

      case R.id.gd_coord_convert:
        startActivity(new Intent(this, GdCoordinateConvertActivity.class));
        break;

      case R.id.btn_alarm_location:
        startActivity(new Intent(this, GdAlarmLocationActivity.class));
        break;
    }
  }
}
